
const directives = []
let files = require.context('./', false, /.js$/)
files.keys().forEach((key) => {
  let name = key.replace(/\.\/((\d|\D)+)\.js/g, '$1')
  if(name !== 'index') {
      directives.push({
          name,
          value: files(key)?.default
      })
  }
})
export default {
    install (Vue) {
        directives.forEach((item) => {
            Vue.directive(item.name, item.value)
        })
    }
}